package com.example.www.controller;

import com.example.www.Service.MessageService;
import com.example.www.ShiTyI.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zhaoss
 * @Date: 2024/11/15 - 11 - 15 - 15:55
 * @Description: com.example.www.controller
 * @version: 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private MessageService messageService;

    @PostMapping
    public User postTest() {
        User user = new User();
        user.setId(2L);
        user.setAuthor("Nacy");
        user.setMessage("OK");
        return user;
    }
}
